﻿#pragma once
#include <vector>
#include <string>
#include <memory>



class InputHandler {
public:
    virtual ~InputHandler(){}
    //获取候选词
    virtual void getCandidates(
        const char* input_code,  //输入的字符
        std::vector<std::string>& out_candidates  //输出的候选词
    ) = 0;

    virtual bool showUI(){return false;} //显示UI
    virtual bool init() = 0; //初始化
    virtual bool release() = 0; //释放资源
};

class InputHanlderFactory{
public:
    static std::shared_ptr<InputHandler> createHandler();
};